package com.ljc.cjgl.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.ljc.cjgl.entitiy.Course;
import com.ljc.cjgl.entitiy.DbFile;
@Repository
public interface FileRepository extends JpaRepository<DbFile, Integer>, JpaSpecificationExecutor<DbFile> {

	public DbFile findByUid(String uid);
	
	@Query(value="select distinct t.course from DbFile t ")
	public List<Course> findDistinctCourse();

	public List<DbFile> findByCourseId(Integer id);

}
